package com.finance.cooperate.data.reader;

import com.finance.cooperate.data.base.ReaderImpl;
import com.finance.cooperate.data.feature.FeatureDefinition;

import java.util.Map;

/**
 * @ClassName PublicReader
 * @Description 公用输出的特征
 * @Author shen
 * @Date 2023/8/10 21:48
 * @Modify ...
 */
public class PublicReader extends ReaderImpl {
    @Override
    public Map<String, String> read(String userId) {

        super.putOriginal(FeatureDefinition.f_public_uid, userId);


        Long loanNum = borrowingService.getCurLoanNum(userId);

        super.put(FeatureDefinition.f_public_loan_num, loanNum);

        String lastSubmitTime = applyService.getLastSubmitTime(userId);

        super.putOriginal(FeatureDefinition.f_public_last_submit_time, lastSubmitTime);

        return super.getResult();
    }
}
